package org.abc.fund.entity.strategy;

import jakarta.persistence.*;
import java.math.BigDecimal;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.abc.fund.entity.funds.FundBasicInfo;

@Embeddable
@Data
@NoArgsConstructor
@AllArgsConstructor
@Builder
public class StrategyComponent {
  @ManyToOne(fetch= FetchType.LAZY)
  @JoinColumn(nullable = false)
  private FundBasicInfo fund;

  /** 成分在策略中的权重 */
  @Column(nullable = false)
  private BigDecimal weight;
}
